<template>
  <div>
    <el-button type="text" @click="jumpInformPage()"
          >查看未处理举报信息</el-button
        >
    <el-table :data="list" style="width: 100%">
      <el-table-column prop="user_id" label="举报人id"> </el-table-column>
      <el-table-column prop="report_type_id" label="举报类型id">
      </el-table-column>
      <el-table-column prop="report_text" label="举报信息"> </el-table-column>
      <el-table-column prop="report_user_id" label="被举报人id">
      </el-table-column>
      <el-table-column prop="report_why" label="举报原因"> </el-table-column>
      <el-table-column prop="report_state" label="状态">
        <template slot-scope="scope">
          <span>{{ scope.row.report_state === 0 ? '未处理' : '已处理' }}</span>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>
<script>
import http from '../api/index';
export default {
  data() {
    return {
      list: [],
    };
  },
  mounted() {
    http
      .dealedMassage({
        report_state: 1,
      })
      .then((r) => {
        console.log(r);
        this.list = r.data;
        console.log(this.list);
      });
  },
  methods: {
    jumpInformPage(){
      this.$router.push('/index/inform/massage');
    }
  },
};
</script>